package config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
import org.springframework.stereotype.Component;
import soundsystem.AutoCD;
import soundsystem.CompactDisc;
import soundsystem.JavaConfigCD;

@Component
@ComponentScan(basePackageClasses = AutoCD.class)
@ImportResource("classpath:compactdisc-context.xml")//引入xml配置
public class CDConfig {

    @Bean(name = "javaConfigCD")
    public CompactDisc javaConfigCD(){
        return new JavaConfigCD();
    }
}
